?>
<?php
$this->_loginForm->render();
?>


<form id="table_new_art" action="/admin/updateart" method="post">
	<div>
		<!-- Construction de la liste des articles -->
		<p>
			<label for="cb_article">Articles </label><br/>
			<select name="cb_article" id="cb_article">
				<option value="0"></option>
				<?php
				while ($cat = current($this->_art_group)) {
					echo '<optgroup label="'.key($this->_art_group).'">';
					foreach($cat as $art)
						echo '<option value="'.$art->get_id().'">'.$art->get_title().'</option>';
					echo '</optgroup>';
					next($this->_art_group);
				}
				?>	
			</select>
			<br/><br/>
		</p>
		<input type="hidden" id="tb_id" name="tb_id" />
		<p>
			Titre : <span id="sp_title"></span><br/>
			Url : <a id="url_preview">http://loudo.net</a>
		</p>
		<p>
			<label for="cb_cat">Catégorie</label><br/>
			<select name="cb_cat" id="cb_cat">
			<?php
			foreach($this->_cats as $cat)
				echo '<option value="'.$cat->get_id().'">'.$cat->get_name().'</option>';
			?>
			</select>
		</p>
		<p>
			<label for="tb_desc">Description</label> (limite conseillée : 150 caractères)<br/>
			<textarea name="tb_desc" id="tb_desc" cols="59" rows="2" ></textarea>
		</p>
		<p>
			<label for="tb_key">Mots clés (limite conseillée : 60 caractères)</label><br/>
			<input type="text" name="tb_key" id="tb_key" size="60" />
		</p>
		<p>
			<input type="checkbox" name="cb_pub" id="cb_pub" value="oui" /><label for="cb_pub">Publier ?</label>&nbsp;
			<input type="checkbox" name="cb_share" id="cb_share" value="oui" /><label for="cb_share">Partageable ?</label>
		</p>
		<p>
			<label for="tb_content">Contenu</label> (<a target="blank" href="http://en.wikipedia.org/wiki/Textile_%28markup_language%29">aide Textile</a>)<br/>
			<textarea name="tb_content" id="tb_content" rows="30" cols="100" style="width:90%;" ></textarea>
		</p>
		<p>
			<input type="button" id="bt_update" value="Mettre à jour l'article"/>
			<input type="button" id="bt_delete" value="Supprimer l'article"/>
		</p>
	</div>
</form>